<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition template="/_setor.xhtml">
	<ui:define name="corpo">

		<div id="conteudo">
			<h:form id="form">

				<h2>
					<h:outputText value="Cadastrar Orgão" />
				</h2>

				<p:messages id="msg" />
				<p:growl id="grow" showDetail="true" sticky="true">

				<p:fieldset legend="Dados do Orgão" style="background-image: url(resources/imagens/72.jpg);">
					<br />
					
						<h:outputLabel value="Sigla: " for="sigla" />
						<p:inputText id="sigla" value="#{orgaoBean.orgao.sigla}" required="true"
							requiredMessage="Preencha o Campo Sigla">
							<f:ajax event="change" />
						</p:inputText>
						<br />					

						<h:outputLabel value="Nome: " for="nome" />
						<p:inputText id="nome" value="#{orgaoBean.orgao.nome}"
							style="width: 300px;" required="true"
							requiredMessage="Preencha o Nome">
							<f:ajax event="change" />
						</p:inputText><br />

						<p:commandButton value="Cadastrar"
							action="#{orgaoBean.grava}" image="ui-icon-disk" update="msg" >
							<f:ajax render="@form" />
						</p:commandButton>
						
				</p:fieldset>	
				</p:growl>					

			</h:form>

		</div>

	</ui:define>
</ui:composition>

</html>
